/**
 * Created by Kuballle on 10/28/2014.
 */

'use strict';

var coCaNgua = angular.module('coCaNgua', ['ngRoute']);


coCaNgua.config(['$routeProvider', function ($routeProvider) {
    $routeProvider
        .when('/main', {
            templateUrl: "template/main.html",
            controller: 'mainApps'
        })
        .when('/login', {
            templateUrl: 'template/login.html',
            controller: 'mainLogin'
        })
        .when('/play', {
            templateUrl: 'template/play.html',
            controller: 'mainPlay'
        })

        .otherwise({ redirectTo: '/main'});

}]);

coCaNgua.controller('mainApps', ['$scope', '$location', function ($scope, $location) {
    $scope.hello = "hello";
    $scope.login = function () {
        $location.path("/login");
    };
//    $scope.play = function(){
//        $location.path("/play");
//    }

}]);
